<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>PHP Switch</title>
</head>
<body>
<h1>PHP Switch</h1>

<div>
    <h3>The PHP switch Statement</h3>
    <?php
    $favcolor = "green";

    switch ($favcolor) {
        case "red":
            echo "Your favorite color is red!";
            break;
        case "blue":
            echo "Your favorite color is blue!";
            break;
        case "green":
            echo "Your favorite color is green!";
            break;
        default:
            echo "Your favorite color is neither red, blue, or green!";
    }
    ?>
</div>
</body>
</html>